Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GNU build error #468

Merged
merged 1 commit into from
Apr 13, 2017
Merged

Fix GNU build error #468

merged 1 commit into from
Apr 13, 2017

Conversation

angus-g
Copy link
Collaborator

@angus-g angus-g commented Apr 13, 2017

Commit aecb998 ("Fixes perfect restart issue in the ICE_SHELF module", 2017-04-07) introduced calls to pass_var() within a subroutine whose ocean_grid_type structure was intent(in). Most compilers seem to be happy with this, but certain versions of gfortran
would fail with the following error:

  call pass_var(CS%area_shelf_h, G%domain)
                                 1
Error: Procedure argument at (1) is INTENT(IN) while interface specifies INTENT(INOUT)

Changing the argument to intent(inout) fixes this.

Commit aecb998 ("Fixes perfect restart issue in the ICE_SHELF
module", 2017-04-07) introduced calls to `pass_var()` within a
subroutine whose `ocean_grid_type` structure was `intent(in)`. Most
compilers seem to be happy with this, but certain versions of gfortran
would fail with the following error:

      call pass_var(CS%area_shelf_h, G%domain)
                                     1
    Error: Procedure argument at (1) is INTENT(IN) while interface specifies INTENT(INOUT)

Changing the argument to `intent(inout)` fixes this.
@gustavo-marques
Copy link
Collaborator

@angus-g, Thanks for catching and fixing that.

@adcroft adcroft merged commit 6379c26 into mom-ocean:dev/master Apr 13, 2017
@angus-g angus-g deleted the gnu-build-fix branch April 13, 2017 21:08
alex-huth added a commit to alex-huth/MOM6 that referenced this pull request Oct 10, 2023
Previously, when ice_viscosity_compute == MODEL, ice shelf viscosity was calculated using 1 quadrature point per cell; however, this quadrature point was not centered in the cell.
-Added a routine bilinear_shape_fn_grid_1qp, which is used to instead calculate viscosity for a single cell-centered quadrature point
-Added an option to define parameter ice_viscosity_compute = MODEL_QUADRATURE, where viscosity is calculated at the same four quadrature points used during the SSA solution (the typical approach in finite element codes).

Note that when using one quadrature point (ice_viscosity_compute == MODEL), array ice_visc(:,:) is the cell-centered ice viscosity. When using four quadrature points (ice_viscosity_compute == MODEL_QUADRATURE), ice_visc(:,:) is the cell-centered ice viscosity divided by the effective stress, Ee, which varies between each quadrature point and is saved in a separate array CS%Ee(:,:,:). In the SSA, ice viscosity is calculated for a cell with indices i,j as ice_visc(i,j) * Ee, where Ee=1 if using one quadrature point for viscosity and Ee=CS%Ee(i,j,k) if using four quad points (where k the current quad point). Also note the post_data call for ice_visc when using four quad points, where Ice_visc is outputted for visualization from a cell as ice_visc(i,j)*Ee_av(i,j), where Ee_av(i,j) is the average Ee in the cell.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants